home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / GemsII / viewcorr / viewcorr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-16  |  1016 b   |  32 lines  |  [TEXT/MPS ]

  1. /* viewcorr.h
  2.  *    The global types for view correlation routines.
  3.  */
  4.  
  5. typedef struct ViewParmsStruct {
  6.     Point3 eye;            /* projection point */
  7.     Matrix3 view;        /* 3x3 rotation matrix */
  8.     Matrix3 viewinv;        /* 3x3 inverse rotation matrix */
  9.     double d_over_s;        /* distance to screen / half screen width */
  10.     double aspect;        /* aspect ratio (for non-square pixels) */
  11.     double halfx, halfy;    /* half of screen resolutions */
  12.     double xcenter, ycenter;    /* center of image */
  13. } ViewParms;
  14.  
  15. typedef struct ViewDataStruct {
  16.     int numpts;            /* number of data points */
  17.     Point3 *pts;           /* array of three D data points */
  18.     Point2 *scrpts;           /* array of screen data points */
  19. } ViewData;
  20.  
  21. /* If you cannot handle arbitrary aspect ratios, change the following define
  22.  * to an undef.  The iteration will happen with the aspect ratio given in
  23.  * the initial set of ViewParms.
  24.  */
  25. #define ITERATE_ASPECT_RATIO
  26.  
  27. #ifdef ITERATE_ASPECT_RATIO
  28. #define NUM_VIEW_PARMS 10
  29. #else
  30. #define NUM_VIEW_PARMS 9
  31. #endif
  32.